package com.tensquare.qa.client;

import com.tensquare.qa.client.impl.LabelClientImpl;
import entity.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

//fallback指的是访问其他微服务失败后，就访问该类下的同名方法进行回调,该类必须是子类
@FeignClient(value = "tensquare-base",fallback = LabelClientImpl.class)
public interface LabelClient {

    //1.根据标签id查询得到标签
    @GetMapping("/label/{labelId}")
    Result findById(@PathVariable("labelId") String labelId);
}
